﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demo
{
    class Pascal_sTriangle
    {
        public static void Demo01()
        {
			
				int[][] arr = new int[10][];
				for (int i = 0; i < arr.Length; i++)
				{
					arr[i] = new int[i + 1];
					arr[i][0] = arr[i][i] = 1;
					for (int j = 1; j < arr[i].Length - 1; j++)
					{
						arr[i][j] = arr[i - 1][j] + arr[i - 1][j - 1];
					}
				}
				for (int i = 0; i < arr.Length; i++)
				{
					for (int j = 0; j < arr[i].Length; j++)
					{
                    Console.Write(arr[i][j] + " "); 
					}
					 Console.WriteLine();
				}
			

		}
    }
}
